export const BASE_COMPONENT_LIST = [
  { type: "el-tabs", label: "标签页" },
  { type: "el-input", label: "输入框" },
  { type: "el-radio-group", label: "单选框" },
];
export const CUSTOM_COMPONENT_LIST = [
  // { type: "pu-container", label: "容器" },
  { type: "pu-line", label: "标题" },
  { type: "pu-image", label: "图片" },
  { type: "pu-goods", label: "商品组件" },
];
export const TREE_LIST = [
  // { label: "基础组件", value: BASE_COMPONENT_LIST, visible: true },
  { label: "定制组件", value: CUSTOM_COMPONENT_LIST, visible: true },
];

export const CUSTOM_COMPONENT_JSON_MAP = {
  "el-radio-group": {
    title: "单选框标题",
    value: 1,
    props: {
      options: [
        {
          value: 1,
          label: "true",
        },
        {
          value: 0,
          label: "false",
        },
      ],
    },
  },
  "pu-line": {
    props: {
      title: "标题",
    },
  },
  "pu-image": {
    label: "图片组件的配置信息",
    configJson: [
      {
        name: "title",
        type: "el-input",
        defaultValue: "图片组件",
        label: "组件标题",
      },
      {
        name: "rule",
        type: "radio-group",
        defaultValue: 1,
        label: "人群",
        options: [
          {
            label: "全部",
            value: 1,
          },
          {
            label: "指定人群",
            value: 2,
          },
        ],
      },
    ],
  },
  "pu-goods": {
    label: "商品组件的配置信息",
    configJson: [
      {
        name: "title",
        type: "el-input",
        defaultValue: "商品组件",
        label: "组件标题",
        rules: [],
      },
      {
        name: "rule",
        type: "radio-group",
        defaultValue: 1,
        // label: "人群",
        options: [
          {
            label: "全部",
            value: 1,
          },
          {
            label: "指定人群",
            value: 2,
          },
        ],
      },
    ],
  },
};
